package test;

import entity.Student;

import java.lang.reflect.Method;

/**
 * @author zhu
 * @date 2024-03-25
 */
public class MainTest03 {
    public static void main(String[] args) {
        Student stu =  new Student();

        Class<?> clazz = stu.getClass();

        Class<?> superClass = clazz.getSuperclass();

        Method[] methods = clazz.getDeclaredMethods();
        for (Method method : methods){
            System.out.println("方法名称：" + method.getName());
        }
    }
}
